#!/bin/bash
#chkconfig: 2345 80 90
#description:jeebiz-boot-app server
#processname:jeebiz-boot-app

#source function library
#. /etc/rc.d/init.d/functions

#application home
export APP_HOME=/u01/jeebiz-boot-app

#Document the app path
echo document the curren path: "$APP_HOME"

#Java environment
#export JAVA_HOME="$APP_HOME/jre"
#export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$CLASSPATH
#export PATH=$JAVA_HOME/bin:$PATH

start()
{
    echo -n $"Starting $prog:"
    $APP_HOME/bin/jeebiz-boot.sh &    
}

stop()
{
    echo -n $"Stopping $prog:"
    pid=$(ps x | grep jeebiz-boot-app | grep -v grep | awk '{print $1}')
    echo pid = "$pid"
    kill -9 $pid
    
}

case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    *)
    echo $"Usage: $0 {start|stop}"
    RETVAL=1
esac
exit $RETVAL